/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package controller;

import controller.service.TeacherControllerService;
import java.util.List;
import model.dao.service.TeacherDAOService;
import model.entities.Teacher;
import model.dao.TeacherDAO;

/**
 *
 * @author pc
 */
public class TeacherController implements TeacherControllerService {

    private static TeacherController teacher;
    public static TeacherController getInstance(){
        if(teacher == null){
            teacher = new TeacherController();
        }
        return teacher;
    }
    
    
    private TeacherDAOService service = TeacherDAO.getInstance();
    @Override
    public List<Teacher> getTeachersList() {
        return service.getTeachersList();
    }

    @Override
    public Teacher getTeacherByID(int TeacherID) {
        return service.getTeacherByID(TeacherID);
    }

    @Override
    public boolean insertTeacher(Teacher t) {
        return service.insertTeacher(t);
    }

    @Override
    public boolean updateTeacher(Teacher t) {
        return service.updateTeacher(t);
    }

    @Override
    public boolean deleteTeacher(int id) {
        return service.deleteTeacher(id);
    }

    @Override
    public Teacher findByID(int id) {
        return service.findByID(id);
    }

    @Override
    public List<Teacher> findByName(String name) {
        return service.findByName(name);
    }
}
